package com.eudi.hadoop.lesson9;

import java.util.Date;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

public class GetLTime {
	public static void main(String[] args) throws Exception {
		Configuration conf = new Configuration();
		FileSystem hdfs = FileSystem.get(conf);
		Path fpath = new Path("/test1.txt");
		FileStatus fileStatus = hdfs.getFileStatus(fpath);
		long modifyTime = fileStatus.getModificationTime();
		System.out.println(new Date(modifyTime));
	}
}
